﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Weapp.Data.Entities;

namespace Weapp.Data.Mappers
{
    public class UserDnDMapper : EntityTypeConfiguration<UserDnD>
    {
        public UserDnDMapper()
        {
            this.ToTable("UsersDnD");

            this.HasKey(c => c.Account);
            this.Property(c => c.Account).HasMaxLength(50);
            this.Property(c => c.Account).IsRequired();

            this.Property(c => c.UserName).HasMaxLength(50);
            this.Property(c => c.UserName).IsRequired();

            this.Property(c => c.Password).HasMaxLength(50);
            this.Property(c => c.Password).IsRequired();

            this.Property(c => c.Role).IsRequired();
        }
    }
}
